/**
 * @filename:ReportCommissionLogServiceImpl ReportCommissionLog
 * @project wallet-sign  V1.0
 * Copyright(c) 2018 Seven Co. Ltd. 
 * All right reserved. 
 */
package com.yixun.qfbao.service.impl;

import com.yixun.qfbao.mapper.ReportCommissionLogMapper;
import com.yixun.qfbao.model.ReportCommissionLog;
import com.yixun.qfbao.model.dto.ReportCommissionLogDto;
import com.yixun.qfbao.service.ReportCommissionLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Calendar;
import java.util.List;

/**   
 *  
 * @Description:  报备佣金操作记录表——SERVICEIMPL
 * @Author:       Seven   
 * @CreateDate:   ReportCommissionLog
 * @Version:      V1.0
 *    
 */
@Service
public class ReportCommissionLogServiceImpl implements ReportCommissionLogService {
	
	@Autowired
	public ReportCommissionLogMapper reportCommissionLogMapper;
	
	//查询对象
	@Override
	public ReportCommissionLog selectById(Long id) {
		return reportCommissionLogMapper.selectById(id);
	}
	
	//删除对象
	@Override
	public int deleteById(Long id) {
		return reportCommissionLogMapper.deleteById(id);
	}
	
	//添加对象
	@Override
	public ReportCommissionLog insert(ReportCommissionLog tmReportCommissionLog) {
		if(tmReportCommissionLog.getCreateTime()==null){
			tmReportCommissionLog.setCreateTime(Calendar.getInstance().getTime());
		}
		reportCommissionLogMapper.insert(tmReportCommissionLog);
		return tmReportCommissionLog;
	}
	
	//修改对象
	@Override
	public int update(ReportCommissionLog tmReportCommissionLog) {
		return reportCommissionLogMapper.update(tmReportCommissionLog);
	}
	
	//查询集合
	@Override
	public List<ReportCommissionLog> queryReportCommissionLogList(ReportCommissionLog tmReportCommissionLog) {
		return reportCommissionLogMapper.queryReportCommissionLogList(tmReportCommissionLog);
	}

	@Override
	public List<ReportCommissionLogDto> selectReportCommissionLogList(ReportCommissionLog reportCommissionLog) {
		return reportCommissionLogMapper.selectReportCommissionLogList(reportCommissionLog);
	}
}